#import "JSONResponseSerializerWithData.h"
 
@implementation JSONResponseSerializerWithData
 
- (id)responseObjectForResponse:(NSURLResponse *)response
                           data:(NSData *)data
                          error:(NSError *__autoreleasing *)error
{
	id JSONObject = [super responseObjectForResponse:response data:data error:error];
	if (*error != nil && data != nil) {
		NSMutableDictionary *userInfo = [(*error).userInfo mutableCopy];
        userInfo[JSONResponseSerializerWithDataKey] = data;
		(*error) = [NSError errorWithDomain:(*error).domain code:(*error).code userInfo:userInfo];
	}
	return (JSONObject);
}

@end